-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow gpg to run factory-reset when the state is corrupted #103
Conversation
cdee438
to
c20b631
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM!
src/command/data.rs
Outdated
} else { | ||
// If the state doesn't load, return placeholder so that gpg presents the option to factory reset | ||
ctx.reply | ||
.expand(b"Card state corrupted. Factory reset recommended") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the second sentence because I’d prefer people telling us in support if they run into this issue. We could still document it in the release notes, but if this happens in a different context, I’d like to know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I recommend them to open an issue ? The limit is 39 characters so I don't think we can put a link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use the URL
DO for that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The limit at 39 characters doesn't seem to be an issue with GPG.
352fc85
to
c51db89
Compare
This PR makes some
GET DATA
commands return placeholder data when the state is corrupted. That way the card can still be factory reset even if the state fails to load. This avoids having to send raw commends as we recommend in the second alpha release notes.When the state is corrupted, the card puts as a placeholder name:
Card state corrupted. Factory reset recommended
, sogpg --card-status
looks like: